home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / docs / ascii / internet / tuning / tuning.faq
Encoding:
Text File  |  1997-06-20  |  58.8 KB  |  1,216 lines

  1. Archive name: ftp.demon.co.uk:/pub/doc/ka9q/Tuning.faq
  2. Posting-frequency: 14 days
  3. Last-modified: 10th July 1995
  4. Version: 29
  5.  
  6. TUNING.FAQ
  7. ==========
  8.  
  9. Changes since 23rd June 1995:
  10.  
  11.  
  12.           *    Update information on V34 access
  13.           *    Update information on vPoPs
  14.           *    Update information on news server
  15.           
  16.  
  17.      If you have any comments on the contents of this FAQ, please let me
  18.      know
  19.  
  20. Changed text is marked by #s
  21.  
  22.  
  23.  
  24. CONTENTS
  25. ========
  26.  
  27.  0.  Introduction
  28.  1.  Do I have a performance problem ("Am I normal ?")
  29.  2.  MODEM.TXT
  30.  3.  MNP5 and other compression
  31.  4.  Hardware overruns
  32.  5.  How fast should I run the link to my modem ?
  33.  6.  Does Windows affect link speeds ?
  34.  7.  Eliminate SMARTDRV, TSRs etc.
  35.  8.  Serial chips
  36.  9.  The KA9Q asystat command
  37. 10.  Internal modems
  38. 11.  IP fragmentation
  39. 12.  NNTP request queues
  40. 13.  HISTORY
  41. 14.  PPP versus SLIP
  42. 15.  Telnet speed
  43. 16.  Other improvements
  44. 17.  OS/2
  45. 18.  The Authors
  46. 19.  Disclaimer
  47.  
  48. 0.   Introduction
  49. ==   ============
  50.  
  51.      This document mainly concerns itself with tuning your KA9Q system to
  52.      access the Internet as efficiently as possible. Time is money (and the
  53.      phone company will send you their bill eventually).
  54.  
  55.      Because people don't always like blindly following instructions some
  56.      explanations are given as to why various things are useful. You can
  57.      skip these sections if you wish and just push the buttons :) Only
  58.      limited initial knowledge is assumed, but by the time you read to the
  59.      end you too could be an expert.
  60.  
  61.      Although this document is specifically aimed at DOS and OS/2 KA9Q
  62.      users, the general discussion is much more widely applicable.
  63.  
  64. 1.   Do I have a performance problem ("Am I normal ?")
  65. ==   =================================================
  66.  
  67.      If you have a USR V 34 or VTerbo modem you should connect to demon via
  68.      the new vPoPs. Most of the VPoPs have VTerbo modems, although these
  69.      are now slowly being updated to V34 standard. Demon have also said
  70.      that they hope to increase the serial port speed to 58,700 or 115,000
  71.      as this occurs. I am currently in the process of gathering figures for
  72.      V34 connections.
  73.  
  74.      If you own a 14.4K modem which can do V42bis (such as a Sportster) and
  75.      you connect to it at 38400 bps (or more) you should be getting a cps
  76.      (characters per second) throughput of at least:
  77.  
  78.                2700 cps for text
  79.                1650 cps for UUENCODED text
  80.                1600 cps for ZIP files
  81.  
  82.      By text is meant general Usenet newsgroups and email. UUENCODE is the
  83.      format used for sending programs, pictures and sounds around within
  84.      text-based newsgroups. ZIP is a popular pre-compressed format for
  85.      binary files transferred by the FTP file transfer protocol.
  86.  
  87.      A 9600 bps modem with V42bis should achieve:
  88.  
  89.                1850 cps for text
  90.                1050 cps for UUENCODED text
  91.                1000 cps for ZIP files
  92.           
  93.      A 9600 bps modem which does no compression at all should achieve a
  94.      touch over 900 cps for all types of data.
  95.  
  96.      Obviously, if you take a mixture of newsgroups some of which are
  97.      binary and some of which are not then you will get intermediate
  98.      performance figures. Also if your newsfeed is mixed in with a lot of
  99.      incoming email then you will get a slower news transfer while the link
  100.      is being shared.
  101.  
  102.      You will also be lucky if you consistently achieve these speeds at
  103.      very busy times (such as early weekday evenings). When there can be
  104.      over six hundred people all transferring data, there is
  105.      unsurprisingly, some degradation in performance. The servers are
  106.      busier, and there is more contention for bandwidth on the Demon LAN.
  107.  
  108.      A new news machine was installed at Demon just before Christmas. It
  109.      has the new Solaris 2.4 operating system and the latest NNTP software.
  110.      This initailay lead to an increase in speed from the server.
  111.      Thoughput is not as high as it could be though due to a bug in the
  112.      Solaris operating system causing retransmittions.
  113.  
  114. #    Over the last few weeks the demon news server has been improved
  115.      considerably so that the 400 server too busy message is rare. The
  116.      problem with retransmizssions is still there though. A number of
  117.      seperate syncronised news servers have also been added. The NNTP
  118.      software has also been optimised by aDe.
  119.  
  120.      There is also some doubt that a very slow machine such as an Amstrad
  121.      1512 can ever reach these speeds, although 12MHz 286s are reported to
  122.      manage just fine. Also, running OS/2 on slow 386s seems to reduce
  123.      maximum news throughput. If you have a slow machine you are advised to
  124.      work through the rest of this document to check that your system is
  125.      optimally tuned; but you may well not achieve the suggested "normal"
  126.      throughput figures. If you are using OS/2 there is some specific
  127.      advice in section 17.
  128.  
  129.      KA9Q will show you the news transfer rate you are achieving if you
  130.      have "nntp verbose on" (type this at the keyboard or add it to
  131.      autoexec.net, perhaps with the DIS front end [D A f6]). The figures
  132.      are also recorded in _\spool\nos.log for posterity. Even with a
  133.      "perfect" set-up you will find the speed achievable for Usenet news
  134.      varies from day to day, but that ZIP and UUENCODE transfer speeds are
  135.      pretty constant.
  136.  
  137.      If you want to try some specific tests then Demon keep some special
  138.      files for FTP access on ftp.demon.co.uk. You will find them in
  139.      /pub/test. The most useful ones for general testing are the various
  140.      "fullfile"s, since "emptyfile" and "regularfile" are easily compressed
  141.      out of existence by almost everything! In fact "emptyfile" is usually
  142.      so compressed across the phone link that it serves merely to measure
  143.      the maximum throughput of the rest of the system.
  144.  
  145.      If you regularly fail to get the figures we mention then there are a
  146.      number of possible reasons. You will need to check your modem is
  147.      properly configured. You will need to eliminate any hardware or
  148.      software overruns. Since the default KA9Q settings are wrong (!) you
  149.      will probably need to tweak some parameters to eliminate IP level
  150.      fragmentation. All of these changes are discussed below.
  151.  
  152.      If you suddenly get a slower transfer then it may be temporary. Maybe
  153.      you picked a busy time, you got a noisy phone line or a system problem
  154.      at Demon caused difficulty. If not a peak time, check the
  155.      demon.announce newsgroup for apologies from Demon, or the
  156.      demon.service newsgroup for other sufferers. It is also a good idea to
  157.      finger status@gate.demon.co.uk as many minor problems are often only
  158.      reported their. If it persists then it was probably the change you've
  159.      just made to your machine. If it just affects news then you must check
  160.      if your history file is too big (see section 13).
  161.  
  162.      Finally, before moving on to practical advice, please note that the
  163.      figures stated are pretty much the best you can hope for (within a few
  164.      percent), and assume that the only limiting factor is the link between
  165.      you and Demon's Finchley network. If you are transferring data from
  166.      the other side of the planet you will be competing for bandwidth
  167.      across the Atlantic, through the US routers and then for some
  168.      attention from a busy server in California (or wherever).
  169.  
  170.      Similarly, though less dramatically, when you use one of the local
  171.      access tPoPs (Edinburgh, Cambridge etc.) then besides all the other
  172.      factors, you will competing with the other local users for a share of
  173.      the 64K line to London. Thus unless you are logging on to a modem in
  174.      Finchley you may never be able to achieve quite the suggested
  175.      throughput. All the vPoPs are connected directly to the Finchley, only
  176.      the tPoPs compete for the bandwidth. If you are using a tPoP you will
  177.      have to see if the saving of the local call outweighs the degradation
  178.      of the service.
  179.  
  180.      As I've stated in the case of the Energis vPoPs, this situation is
  181.      eased as all the modems are actually connected directly to the
  182.      Finchley network. Therefore if you have the choice between a local
  183.      vPoP or tPoP I would suggest that you use the vPoP which should
  184.      increase your throughput. The numbers for these lines are available in
  185.      Welcome.txt (on ftp.demon.co.uk)
  186.  
  187. 2.   MODEM.TXT
  188. ==   =========
  189.  
  190. Advice:
  191.      Read MODEM.TXT (this advice is traditionally chanted in unison)!
  192.  
  193. How:
  194.      Demon maintain and publish a related document to this one called
  195.      "MODEM.TXT" which you should find in the KA9Q distribution ZIPfile, or
  196.      on ftp.demon.co.uk as /pub/doc/Modem.txt (the M is a capital).
  197.  
  198. Why:
  199.      MODEM.TXT explains about using proper cables to your modem and the
  200.      basics of setting up your modem for use with KA9Q. Suggestions that it
  201.      fully explains the meaning of life are unfounded, but it (like the
  202.      other Demon produced documentation) does cover a lot of ground and
  203.      reading it is to be highly recommended.
  204.  
  205.      The purpose of MODEM.TXT is to get you connected and data flowing.
  206.      This document on the other hand is intended to get that data flowing
  207.      at an optimum rate.
  208.  
  209.      If you post to the demon.ip.support.* newsgroups and cannot say that
  210.      you have read MODEM.TXT (and of course this document TUNING.FAQ) then
  211.      you are wasting everyone's time, including your own. People may well
  212.      point this out to you by email; more or less politely.
  213.  
  214. 3.   MNP5 and other compression
  215. ==   ==========================
  216.  
  217. Advice:
  218.      Configure your modem to use V42bis not MNP5.
  219.      If you only have MNP5 then use it only for text transfers
  220.  
  221. How:
  222.      RTFM! Sorry, but the AT commands for configuring your modem are not
  223.      standardised across different models. MODEM.TXT contains some set-up
  224.      strings which may help you.
  225.  
  226. Why:
  227.      MNP5 is a data compression scheme which modems use whilst the data is
  228.      transferred across the phone link. Unfortunately, although it will
  229.      compress text fairly well, and is said to be especially good at
  230.      UUENCODED text, it can (and does!) make ZIP files bigger! V42bis is a
  231.      compression scheme which is smart enough to quit if it is making
  232.      things worse.
  233.  
  234.      If your modem does V42bis then use this and turn off MNP5. Otherwise
  235.      you should turn off MNP5 unless you know that you will only be
  236.      transferring text. Some people go as far as to arrange two separate
  237.      set-ups and they log off and redial with the other set-up if they are
  238.      going to FTP some ZIPs rather than collecting their newsfeed.
  239.  
  240. 4.   Hardware overruns
  241. ==   =================
  242.  
  243. Advice:
  244.      You MUST try to eliminate hardware overruns.
  245.  
  246. How:
  247.      You can tell if you have hardware overruns by using the KA9Q asystat
  248.      command (just type it at the NET prompt). If 'hw over' is non-zero
  249.      then you have a problem. If 'sw over' is non-zero then you also have a
  250.      problem. For more about asystat in general, and software overruns in
  251.      particular, see section 9.
  252.  
  253.      To fix a hardware overrun problem:
  254.  
  255.      Slow down the link to the modem         see section 5
  256.      Try using a Windows DOS box             see section 6
  257.      Try not using a Windows DOS box (!)     see section 6
  258.      Get rid of TSRs, SMARTDRV &c            see section 7
  259.      Buy a 16550A                       see section 8
  260.  
  261. Why:
  262.      If you are getting hardware overruns then your throughput will suffer!
  263.      Because of the nature of the TCP/IP link you will suffer a lot more
  264.      than you would on normal comms links to Bulletin boards. Thus a set-up
  265.      which works marginally to, say, CIX can work very badly indeed to
  266.      Demon.
  267.  
  268.      Your modem is generating characters in an unstoppable sort of way,
  269.      though at a maximum fixed rate (9600, 19200, 38400 etc.). When the
  270.      characters turn up at the PC end of the cable they must be recorded
  271.      into the PC memory before the next character turns up. If they are not
  272.      "read" and transferred to memory then they will be lost. When the
  273.      standard 8250 serial chip "interrupts" the PC to tell it that a
  274.      character is ready then the PC has just one character time to read it
  275.      before the next one appears and replaces it. (Of course if the next
  276.      character is late arriving because the link is not fully utilised then
  277.      the PC has correspondingly longer to react.)
  278.  
  279.      If the PC loses a character then the entire packet it formed part of
  280.      will have to be sent again. Packets may well be 1500 bytes long so
  281.      this can take some time. Further, because of the way the TCP/IP
  282.      protocols work the re-sending may not start until after a non-trivial
  283.      timeout has elapsed.
  284.  
  285.      Worse, if you are receiving data from a long way away then at any
  286.      given time there is a lot of data "in the pipeline" coming to you.
  287.      When the other end realises that you've lost some data it will resend
  288.      that data and continue on from there. Naturally KA9Q will hang onto
  289.      the good data which turns up after the damaged packet and thus once
  290.      the retransmission starts and the missing packet arrives it can (and
  291.      does) acknowledge everything it has. However, by the time the other
  292.      end receives this acknowledgement the pipeline may be refilled and
  293.      thus, despite KA9Qs best efforts, you will still receive a lot of
  294.      duplicate data, which takes time to be transferred to your PC and then
  295.      discarded.
  296.  
  297.      All of this means that hardware overruns have a significant effect on
  298.      overall throughput, and their elimination is extremely important.
  299.  
  300. 5.   How fast should I run the link to my modem ?
  301. ==   ============================================
  302.  
  303. Advice:
  304.      Modern modems compress the data they send across the phone line, so to
  305.      keep up you need to run the serial link to them quite a bit faster
  306.      than the speed they have apparently connected at to the other end.
  307.  
  308.      Use the fastest possible serial link speed to connect to your modem
  309.      PROVIDED that you do not get hardware overruns. 19200 bps is too slow
  310.      for a 14.4K connection.
  311.  
  312. How:
  313.      The serial link speed is configured by the DIS front-end program, [D
  314.      A] (your chosen setting eventually ends up in the ppp attach command
  315.      in autoexec.net in the main KA9Q directory).
  316.  
  317.      e.g. attach asy 0x3e8 4 ppp sl0 4096 1500 38400
  318.                                                -----
  319. Note:
  320.      The letters "AT" at the start of each modem command form a (carefully
  321.      chosen) bit pattern which allows your modem to automatically detect
  322.      the serial link speed. Thus modems do not usually need any
  323.      reconfiguring when you try different speeds.
  324.  
  325. #    It should also be noted that the current version of KA9Q cannot handle
  326.      this throughput being set to 115000 due to a bug which should be fixed
  327.      in the next release.
  328.  
  329. Why:
  330.      There are two speeds involved in communications. First there is the
  331.      speed at which bytes of data are transferred to and from the modem.
  332.      This will be either down a cable to an external modem, or in the case
  333.      of an internal modem, the speed at which the interface chips pass data
  334.      to the rest of the card. This document calls this the "serial link
  335.      speed", but elsewhere you may see it called the DCE/DTE speed. The
  336.      second speed is the connection speed across the telephone wires.
  337.  
  338.      Not all that many years ago modems ran at 1200 baud, and you used 1200
  339.      bps serial links to them. Modern modems use complicated encoding
  340.      methods so that transitions on the wire no longer directly correspond
  341.      to bits of data (this is the distinction which professionals and
  342.      pedants like to make between bps and baud). Furthermore, if requested,
  343.      the data itself is compressed (using MNP5, V42bis etc.) before it is
  344.      transmitted and it is then re-expanded at the other end. As a result
  345.      you can regularly get text transferred at 3000 or more bytes per
  346.      second down a 14.4K link. (In fact, sequences of identical bytes can
  347.      be compressed almost out of existence. The protocol headers on TCP/IP
  348.      packets prevent this occurring, so it is very unusual to see speeds
  349.      much above 3200 bytes per second).
  350.  
  351.      Since there are 10 bits per byte on a serial link, using 19200 bps
  352.      will only allow you to transfer 1920 bytes per second. Obviously if
  353.      you have a 14.4K modem which can move over 3000 bytes per second of
  354.      textual data this can create a bottleneck. Using 38400 bps will almost
  355.      invariably make the phone link the limiting factor. At the other end
  356.      Demon connect their computers to their modems at 38400, thus overall
  357.      (in a steady state) 38400 bps is sufficient.
  358.  
  359.      But a steady-state analysis is not the end of the story, since your PC
  360.      might get a little behind in servicing the serial port (because of
  361.      writing to disk for example). Therefore it is theoretically helpful to
  362.      run at 57600 so that your PC can catch up, should it ever get behind
  363.      in this way. However, since 38400 already exceeds the transfer rates
  364.      that you will get on real data (which never contains indefinite runs
  365.      of identical characters), then if your modem or serial card will only
  366.      do 38400 this is not a matter to cause you much concern.
  367.  
  368.      At faster speeds your PC has less time to deal with incoming
  369.      characters before the next one appears. For example, 38400 produces
  370.      characters four times as fast as 9600. This can produce hardware
  371.      overruns - which as discussed above can severely degrade throughput.
  372.      If you get hardware overruns at 57600 then try 38400 since this will
  373.      be just as good in practice.
  374.  
  375.      Similarly, if you get overruns at 38400 then try 19200. Some people
  376.      state that a few hardware overruns at 38400 gives them better overall
  377.      performance than no hardware overruns at 19200. The trade-off will
  378.      depend upon how soon the TCP/IP link resends data and how quickly your
  379.      acknowledgements reach the other end and this will in turn depend upon
  380.      how much Internet there is between you and the data sender. It would
  381.      naturally be better to try the other advice in this document and
  382.      achieve 38400 and NO overruns!
  383.  
  384.      Of course not everyone has a 14.4K or 28.8k modem. Demon do not let
  385.      you connect at 1200 because you cannot get packets back and forth
  386.      quickly enough and some protocols time out. Many people use 2400 or
  387.      9600 bps modems ... they may well find that there is no advantage in
  388.      increasing serial link speeds past 4800 or 9600. However, provided
  389.      that there are no hardware overruns there should be no disadvantage to
  390.      higher speeds, so use them if you can.
  391.  
  392. #    Demon are now in the process of updating all their modems to v34. All
  393.      the vPoPs have now been upgraded and work on the the older PoPs is
  394.      being planned. Demon have also increased the speed of their terminal
  395.      servers from 38400 to 115,000. This should give a considerable
  396.      increase in performance if you have a V34 modem.
  397.  
  398. 6.   Does Windows affect link speeds ?
  399. ==   =================================
  400.  
  401. Advice:
  402.      Try running KA9Q in a full screen Windows DOS session !
  403.      (or possibly, avoid running KA9Q in a Windows DOS session !!)
  404.  
  405. How:
  406.      Provided your SYSTEM.INI file correctly lists your hardware you should
  407.      have no problems using serial ports from a DOS session. Beware of
  408.      serial mice ... in the usual configuration of a PC COM1 and 3 share
  409.      the same IRQ (as do 2 and 4). This might not show up if you don't load
  410.      a mouse driver except within Windows.
  411.  
  412. Why:
  413.      Under Windows real hardware devices are handled by device drivers, and
  414.      programs like KA9Q do not actually access the hardware directly. In
  415.      principle this "virtualisation" slows things down so DOS sessions
  416.      should be worse than not using Windows. However, because Windows
  417.      device drivers are well integrated into the system, you may find you
  418.      can use faster speeds without getting hardware overruns.
  419.  
  420.      Even the slowest PCs are quite fast enough to handle 3000 interrupts a
  421.      second from a serial port. However, besides processing the incoming
  422.      data the information is also stored on disk, and text is written to
  423.      the screen to keep the user appraised of progress. Unhappily, whilst
  424.      doing this DOS and the PC BIOS can lock out interrupts for relatively
  425.      long periods, and so the PC is not able to break away from another
  426.      task and service the serial port. Thus you can get hardware overruns.
  427.      Avoiding any quasi-religious discussion of the merits of alternative
  428.      operating systems, we can note that Windows has avoided these problems
  429.      with DOS and the BIOS (in the jargon, it can handle short crisis time
  430.      devices), and so you probably get fewer overruns than from raw DOS.
  431.  
  432.      The word "probably" in the last sentence was chosen carefully.
  433.      Certainly many machines do run better, but some people do worse in
  434.      Windows DOS sessions than otherwise, though seldom so much worse as to
  435.      make it worth changing. Fast machines and SCSI drives seem to help you
  436.      do better under Windows than DOS. Slow machines seem to work better
  437.      under DOS than Windows. The only plausible advice seems to be "try it
  438.      and see".
  439.  
  440.      Running in a Windows DOS session is much less likely to be beneficial
  441.      if you are not in full screen mode. When the session is made a window
  442.      on the desktop there is a significant overhead involved in rolling
  443.      text up. This can cause data loss. If you change away to another
  444.      window then how much attention KA9Q gets will depend upon the other
  445.      program's ability to share machine time, and on the various priorities
  446.      of the tasks you are running.
  447.  
  448. 7.   Eliminate SMARTDRV, TSRs etc.
  449. ==   =============================
  450.  
  451. Advice:
  452.      If you are getting hardware overruns then experiment in running
  453.      without DBLSPACE, SMARTDRV, MIRROR or inessential TSRs.
  454.  
  455.      Even if you don't remove these utilities, some configurations are
  456.      worse than others, so parameter twiddling may help.
  457.  
  458. How:
  459.      RTFM (for DOS or the TSR)
  460.  
  461. Why:
  462.      As indicated in the previous section, you get overruns when your PC is
  463.      not informed (by an interrupt) of an incoming character, until it is
  464.      too late. Disk compression and disk caching software can disable
  465.      interrupts for long periods and thus cause problems. In general, the
  466.      faster your machine the faster it will be executing these critical
  467.      sections, and so the less likely you are to have problems.
  468.  
  469.      DBLSPACE seems to have caused a lot of problems to people who have
  470.      tried to use it. A common workaround is to arrange for the incoming
  471.      newsfeed (in _\spool\articles) to be on an uncompressed disk, whereas
  472.      the newsbase (_\spool\news\newsbase) is kept on a compressed area
  473.      since it is only used off-line when disabling interrupts is of little
  474.      consequence. If you want to change the incoming temporary directory
  475.      then either edit the configuration files directly, or use the DIS
  476.      front-end [E J A] to change the line starting "newsdir"; then [D F A]
  477.      to change the line starting "nntp dir" to correspond. You then need to
  478.      edit DEMON.BAT by hand; in the section starting :net change the
  479.      directory tested for BATCH.TXT.
  480.  
  481.      SMARTDRV has also caused problems, though many people seem to feel
  482.      that it can improve throughput if you can make a big cache with
  483.      delayed writes. Small caches with delayed writes seem to cause
  484.      problems. Big caches without delayed writes generally seem to be OK.
  485.      These results may just be caused by the bigger caches making it less
  486.      likely that *any* disk transfers are needed. Similarly, since most
  487.      data is incoming, turning off write caching will mean that a disk
  488.      cache has little enough to do whilst you are on-line.
  489.  
  490.      This is obviously an area which requires experimentation to determine
  491.      the best solution for your configuration. You could try editing the
  492.      DEMON.BAT file to add extra enable/disable commands before and after
  493.      running KA9Q.
  494.  
  495. 8.   Serial chips
  496. ==   ============
  497.  
  498. Advice:
  499.      Use a 16550A serial chip
  500.  
  501.      If you fit a 16550A you can probably ignore all the other advice in
  502.      this document about eliminating hardware overruns, because you will
  503.      find that no matter what, none will occur. Or to put it another way,
  504.      if 16550As were free, sections 4..8 of this document could be
  505.      discarded altogether.
  506.  
  507. How:
  508.      Most PCs are still shipped with 8250 serial chips (UARTs). If socketed
  509.      they can be directly replaced by a 16550A. If soldered in, or if your
  510.      serial card is a modern highly integrated device (doing parallel,
  511.      disks, washing machine etc.) then you will need to add another serial
  512.      card. If you don't have a spare slot then you'll need to buy a
  513.      multifunction card with a 16550A on it.
  514.  
  515.      A quick glance at MicroMart (Thursdays, 60p) will yield literally
  516.      dozens of suppliers of 16550A boards and chips. They change so fast
  517.      that specific recommendations are impossible, but as a guide you
  518.      should pay no more than 20 pounds (+VAT & postage) for a serial card
  519.      and a fiver or more less than this for just the chip on its own. Fans,
  520.      and one-stop shoppers, can also purchase these items directly from
  521.      Demon, but although service and support may be better, their prices
  522.      are less keen.
  523.  
  524.      If you aren't sure what sort of chip you have then the Microsoft
  525.      supplied program MSD.EXE (in your DOS or Windows directory) can
  526.      probably tell you. Run the program outside of Windows for the most
  527.      reliable answer. However MSD can become confused by some multi-
  528.      function cards, and if you have an unusual configuration it can fail
  529.      to identify which port is which! Numerous other utilities exist which
  530.      will check out your serial cards. Try ftp.demon.co.uk for
  531.      /pub/simtel20/msdos/modem/modemd52.zip.
  532.  
  533.      Also, of course, KA9Q will tell you the details of the port which it
  534.      is using. See the description of asystat in the next section.
  535.  
  536.      In passing, it should be noted that there are a fair number of
  537.      alternative serial chips, as well as dual port versions of the 16550A.
  538.      The 16550 is not suitable (it contains a FIFO, but it does not work
  539.      properly). KA9Q correctly detects all the chip variants whose FIFO can
  540.      be used. Christian Blum has collated an excellent FAQ called
  541.      The_Serial_Port which covers the various alternative chips in detail.
  542.      You can find this at pfsparc02.phil15.uni-sb.de in the directory
  543.      /pub/E-Technik/afd. We will not repeat all of the information here
  544.      since:
  545.  
  546.           *    the 16550 has not been manufactured for years so now you are
  547.                unlikely to be offered anything other than a proper 16550A,
  548.  
  549.           *    the various other letters at the start and end of the chip
  550.                part number are manufacturer specific, or just tell you
  551.                whether it is NMOS or CMOS.
  552.  
  553.      so just order a "16550A" card or chip, and of course if it is a
  554.      replacement then tell the supplier what the current chip designation
  555.      is. In the unlikely event you get the wrong device then the Sale of
  556.      Goods Act will protect your investment :-)
  557.  
  558. Explanation:
  559.      The important difference between an 8250 and a 16550A is that the
  560.      latter contains a 16 byte first-in first-out ("FIFO") buffer. This
  561.      means that when bytes turn up on the serial link the "crisis time"
  562.      before they are overwritten by further characters is significantly
  563.      extended. As previously mentioned, when a PC is doing nothing but
  564.      processing serial data there is no problem in it keeping up, and it
  565.      turns out that the modest increase in buffering provided by a 16550A
  566.      is quite sufficient for current applications and modem speeds.
  567.  
  568.      In fact the buffering is more than is needed in practice, so that a
  569.      secondary benefit is possible. Instead of interrupting as soon as a
  570.      character turns up (and giving the PC 15 or so more character times to
  571.      respond) the chip can be configured by software to buffer several
  572.      characters before interrupting at all (whilst still leaving several
  573.      spare slots in the FIFO for further characters). This means that the
  574.      PC is interrupted less often, and this can improve performance
  575.      slightly. Naturally, there is a scheme whereby if no further
  576.      characters seem to be appearing, then an interrupt is generated for
  577.      the partially filled buffer - you can detect this happening with the
  578.      asystat command.
  579.  
  580.      The reduction of interrupt load of a 16550A is of particular benefit
  581.      to Windows which you will recall must "virtualise" the hardware
  582.      device. This is all overhead, and the less the better. Sadly the
  583.      standard drivers shipped by Microsoft take limited advantage of the
  584.      16550A. There are some third-party alternatives such as the Cybercom
  585.      driver on ftp.demon.co.uk in /pub/ibmpc/windows/utilities/cyberc.zip.
  586.      It uses different settings to make better use of the FIFO buffers. The
  587.      difference is said to be greatest on Windows 3.0, and hard to measure
  588.      on 3.11.
  589.  
  590.      The bottom line is that a 16550A is a Good Thing and as many people
  591.      know, not only in theory! As modem speeds increase it will become ever
  592.      more necessary. Further, it can help a bit even if you weren't getting
  593.      hardware overruns - and it might let you put back some of your TSRs
  594.      (DBLSPACE, SMARTDRV or whatever).
  595.  
  596.      Of course, if you want to be really fancy you can buy proprietary
  597.      enhanced serial interfaces or even serial boards with 16K buffers on
  598.      them... but not for the same price as 16550As!
  599.  
  600. 9.   The KA9Q asystat command
  601. ==   ========================
  602.  
  603. Advice:
  604.      Use the asystat command to check for hardware and software overruns.
  605.  
  606. Discussion:
  607.      When you type asystat at the net> prompt KA9Q will tell you a lot of
  608.      useful low level information about how the serial link has been
  609.      performing so far this session.
  610.  
  611.      e.g.
  612.  
  613.      sl0: [NS16550A] [trigger 0x7e] 38400 bps
  614.      RX: x int, x chr, x hw over, x hw hi, x fifo TO, x sw over, x sw hi
  615.      TX: x int, x chr, x q, x MS int, x THRE TO
  616.  
  617.      The first line tells you about the hardware configuration:
  618.  
  619.      'sl0' is the mnemonic name for serial link interface zero.
  620.  
  621.      '[NS16550A]' shows that KA9Q has detected that a 16550A is fitted and
  622.      it is using the FIFOs. It will be absent if you have some lesser chip.
  623.  
  624.      '[trigger 0x7e]' is to do with the protocol used, and is not of
  625.      general interest.
  626.  
  627.      '38400bps' is the serial link speed between the modem and PC.
  628.  
  629.      The first line will also tell you if CTS flow control and/or RLSD
  630.      (carrier detect) line control is enabled.
  631.  
  632.      The second line gives statistics for received (RX) information.
  633.  
  634.      'int' is the total number of interrupts which have occurred.
  635.  
  636.      'chr' is the total number of characters received.
  637.  
  638.      These numbers show you how busy your link has been. On a 16550A
  639.      (though not necessarily on the Hayes ESP interface) you will see that
  640.      'chr' is much more than 'int' because characters are transferred in
  641.      batches. These are raw numbers, including all protocol headers, escape
  642.      characters and any duplicate data.
  643.  
  644.      'hw over' is the total number of hardware overruns which have
  645.      occurred. ie this is the number of individual characters which have
  646.      been lost. FOR BEST RESULTS THIS VALUE SHOULD BE ZERO!
  647.  
  648.      'hw hi' is the highest number of characters read during a single
  649.      interrupt. It is reset to zero every time you do an asystat command.
  650.      As this number approaches the buffer size in your chip it indicates
  651.      how much of a risk you are running of getting a 'hw over'. If you run
  652.      under Windows you may well see values of 30 or more here. This is
  653.      showing you how many characters the device driver is buffering, rather
  654.      than the size of the buffer in the chip itself.
  655.  
  656.      'fifo TO' is only reported for 16550As. It is the number of times
  657.      interrupts were generated because characters were in the buffer but no
  658.      more were arriving. TO stands for time out.
  659.  
  660.      'sw over' is the number of times that the KA9Q buffers have
  661.      overflowed. Just as with hardware overflows this is bad news. FOR BEST
  662.      RESULTS THIS VALUE SHOULD BE ZERO!
  663.  
  664.      If you are getting 'sw over's then you need to increase the buffer
  665.      sizes by altering the attach command to allocate a larger input "ring
  666.      buffer":
  667.  
  668.      e.g. attach asy 0x3e8 4 ppp sl0 4096 1500 38400
  669.                                      ----
  670.      Try 8192 or even 16384. Actually, any value you use will be taken to
  671.      the nearest multiple of 8, so you don't need these very "techie"
  672.      powers of 2 for the size, so feel free to try 10000, 11000 etc.
  673.  
  674.      'sw hi' is the "high water mark" showing the maximum space ever used
  675.      within the KA9Q buffer. If this value is always much less than the
  676.      buffer size then you could safely reduce the buffer size, and free up
  677.      memory for other purposes. This value is reset to zero by the asystat
  678.      command.
  679.  
  680.      The third line gives statistics for transmitted (TX) information.
  681.  
  682.      'int' is the total number of interrupts which have occurred.
  683.  
  684.                'chr' is the total number of characters transmitted.
  685.  
  686.                'q' is the total characters currently queued for sending.
  687.  
  688.                'MS int' counts modem status interrupts. You'll usually see
  689.                a handful of these, corresponding to your modem managing to
  690.                CONNECT. If you are using CTS or RLSD line control then this
  691.                number will tell you how often this is occurring.
  692.  
  693.                'THRE TO' relates to transmit interrupt timeouts. It is not
  694.                of general interest.
  695.  
  696. 10.  Internal modems
  697. ==   ===============
  698.  
  699.      All of the advice given in sections 4..7 and 9 applies equally well to
  700.      internal modems.
  701.  
  702.      An external modem lives at the other end of a cable from the computer.
  703.      As characters arrive over the phone line it will send them down the
  704.      cable to the computer whether or not the last one has been dealt with
  705.      yet. An internal modem is directly connected to the serial port
  706.      hardware within the computer, in fact they will be on the same board
  707.      if not the same chip. Thus an internal modem has access to the serial
  708.      chip and can therefore, in principle, "know" whether or not the
  709.      computer has processed the last character yet. This allows internal
  710.      modems to use their own buffering system to avoid "overruns", should
  711.      the computer occasionally be slow at processing incoming characters.
  712.  
  713.      For their serial port hardware internal modems may actually use an
  714.      8250 or a 16450 chip (much the same as far as this document is
  715.      concerned), or more likely they will contain some custom chips which
  716.      emulate one or the other. Either way, for the reasons just mentioned,
  717.      they will not generally exhibit the same sort of overrun problems that
  718.      an external modem with a real 8250 would suffer from. Thus you should
  719.      not be concerned if your modem does not contain a 16550A.
  720.  
  721.      To be perfectionist, everything else being equal, then you would
  722.      prefer an internal modem to emulate a 16550A rather an 8250 because of
  723.      the lower interrupt load. However, provided the buffering is adequate,
  724.      the difference in KA9Q performance caused by fewer interrupts may be
  725.      hard to measure.
  726.  
  727. 11.  IP fragmentation
  728. ===  =================
  729.  
  730. Advice:
  731.      Make sure that incoming packets are not being fragmented.
  732.  
  733. How to detect fragmentation:
  734.      Use the KA9Q "ip status" command. Look at the variable (14) called
  735.      ipReasmReqds. If it is not zero then you are getting fragmented
  736.      packets and this must be corrected.
  737.  
  738.      The other statistics count IP packets and most of the other
  739.      fragmentation values (the ones towards the end of the list) should
  740.      also be zero except ipReasmTimeout which will be 30. This is the time
  741.      KA9Q waits for the rest of a fragmented packet to appear and hence it
  742.      is correct that it is not zero!
  743.  
  744. Background - what is fragmentation:
  745.      When data is sent from machine to machine over a TCP/IP link it is
  746.      parcelled up into packets. The end machines agree the size to be used
  747.      which is called the maximum segment size (MSS). The data has 40 bytes
  748.      of TCP/IP header added and is then placed inside of a hardware
  749.      datagram, on a Ethernet, X25 network or whatever is used to move the
  750.      data across the Internet, possibly through 30 or 40 hops from the
  751.      other side of the planet to your machine.
  752.  
  753.      If at any stage the data will not fit into the datagram for the next
  754.      hop it will be split up (fragmented) and the fragments travel onward
  755.      to be reassembled within KA9Q. Since the fragments each have their own
  756.      header there is an extra overhead associated with fragmentation. You
  757.      might think that this overhead was the difference between (header(40)
  758.      + data(n)) and (40 + n/2 + 40 + n/2 = 80+n) but it is in fact a great
  759.      deal worse than this...
  760.  
  761.      ... On PPP connections (and indeed on SLIP as well) the packet headers
  762.      are usually sent using "Van Jacobson" (VJ) compression. This very
  763.      clever scheme means that headers are typically transferred in only 5
  764.      bytes or so instead of the usual 40. However, fragmented packets are
  765.      never compressed (since in a well-ordered network they should never
  766.      occur). Thus, in the example, the difference fragmentation makes is
  767.      between (5 + n) and (80 + n) [approximately]. On a typical connection
  768.      to Demon using the standard KA9Q configuration fragmentation will
  769.      degrade your performance about EIGHT PERCENT. This is very
  770.      significant, and is well worth avoiding.
  771.  
  772.      There is a scheme which is being introduced across the Internet to
  773.      allow machines to dynamically determine the MTU (maximum transfer
  774.      unit) between them. This "path MTU discovery" is used to ensure that
  775.      datagrams are never bigger than the smallest size on any link they
  776.      must traverse. Sadly, many machines do not use this scheme, so human
  777.      intervention is required to set the values correctly.
  778.  
  779. More advice:
  780.      Use an MSS of 536. Then set the KA9Q ppp link parameters to use MSS+40
  781.      (ie 576) as the datagram size (the MTU). This in most cases is the
  782.      default setting.
  783.  
  784.      You can do about 0.6% better than this in one special case...
  785.  
  786.      If you are connecting ONLY to Finchley (not to any other PoPs) AND you
  787.      will not be using the trans-Atlantic link (ie you are only going to
  788.      receive email and Usenet news, or use the local ftp.demon.co.uk) THEN
  789.      (and only then) you can use an MSS of 1460. Set the ppp link
  790.      parameters to MSS+40 (ie 1500). You MUST also change your login script
  791.      to specify the protocol as "PPP,mru=1500" rather than just PPP. (mru
  792.      is an equivalent acronym for MTU!). Remove the mru=1500 if you change
  793.      away from 1500::1460 otherwise KA9Q will fail to connect.
  794.  
  795. Note:
  796.      In the past Demon used different datagram sizes on their links. In
  797.      that different world, different settings were optimal. Any previous,
  798.      now out of date, advice should be ignored!
  799.  
  800.      Always using the 576::536 (MTU::MSS) setting will cost you less than a
  801.      1% overhead compared with "optimum" 1500::1460 value for Finchley only
  802.      usage. Using 1500::1460 to any other PoP, or across the Atlantic will
  803.      immediately risk an 8% degradation. So unless you are very sure that
  804.      your usage fits the special case you should pick 576::536.
  805.  
  806.      If you regularly transfer files from non-Demon server machines then
  807.      you should check for IP fragmentation. Although 576::536 is a good
  808.      setting for most places on the Internet there is no guarantee that
  809.      smaller values are not being used on some of the links the packets
  810.      traverse.
  811.  
  812.      If you use telnet a lot then more advice is given below.
  813.  
  814. How:
  815.      Decide if you are going to use an MSS of 1460 or 536 (or perhaps less,
  816.      see later advice).
  817.  
  818.      Now edit the autoexec.net file in the main KA9Q directory. You change
  819.      the lines:
  820.  
  821.           attach asy 0x3e8 4 ppp sl0 4096 1500 38400
  822.                                           ----
  823.           tcp mss 1460
  824.                   ----
  825.           ppp sl0 lcp local  mru 1500
  826.                                  ----
  827.           ppp sl0 lcp remote mru 1500
  828.                                  ----
  829.  
  830.      Note that sl0 is "s" "el" "zero" (serial line 0); an error-prone
  831.      choice of identifier! You change the 1460 value to your chosen MSS
  832.      (usually 536) and the 1500 value to MSS + 40 (usually 576).
  833.  
  834.      Also, if you are not using 576::536 (for example if you choose to use
  835.      1500::1460) then you need to edit the dialler sequences to respond
  836.      "ppp,mru=1500" to the "Protocol" prompt. You can do this from the DIS
  837.      front end (option D, option A, f5) or by editing the DIALER file
  838.      directly. The mru= value should correspond to your MSS + 40 value.
  839.      There is no harm in using mru=576, but it is not necessary.
  840.  
  841. Why:
  842.      The situation with remote tPoPs (Warrington, Reading etc.) is simplest
  843.      to explain. Demon have configured the link to and from Finchley to use
  844.      576 byte datagrams, ie there is room for 40 bytes of TCP/IP header and
  845.      536 bytes of data. They have done this because they want short packets
  846.      travelling the link, so that when you call the PoP the login sequence
  847.      can transfer information back and forth without having to wait for
  848.      very long packets to finish. This 576 value is fixed, so you must set
  849.      the MSS to 536 or less (and therefore set the total packet size in the
  850.      ppp parameters to 576 or less).
  851.  
  852.      As the vPoPs are based at the Finchley Network Centre they should have
  853.      the same performance as the original Finchely tPoP.
  854.  
  855.  
  856.      Similarly, the transatlantic link is configured to use 576 byte
  857.      datagrams (again to improve general responsiveness). Any packets
  858.      larger than 576 are fragmented before they can be carried across it.
  859.  
  860.      The routers at Finchley have a default configuration of 576, so there
  861.      is no problem in connecting to them at this size.
  862.  
  863.      However, Demon's Ethernet LAN uses 1500 byte datagrams, and it is
  864.      possible to configure the Finchley routers to use 1500 byte datagrams
  865.      on the phone link by adding "mru=1500" to the login sequence. You then
  866.      set the MSS to 1460 and configure the KA9Q ppp link to 1500. Provided
  867.      your traffic just flows across the Demon LAN (ie is just incoming
  868.      email, Usenet news and local FTP) then it will not be fragmented.
  869.  
  870.      In theory, you would only need to alter the KA9Q PPP settings, and the
  871.      magic of the PPP protocol will correctly reconfigure the router at the
  872.      other end of the link. However, the routers at Finchley have been
  873.      configured to 576 in a "broken" way (ie not conforming to the RFCs)
  874.      and so if you set 1500::1460 (the default KA9Q configuration!) then
  875.      the link will actually be configured to run at 576::1460 ie with
  876.      fragmentation occurring and 8% less throughput than you might expect.
  877.      Setting mru=1500 stops this problem occurring. Configuring to 576::536
  878.      also prevents the problem.
  879.  
  880.      When the ramifications of the "broken" routers on IP fragmentation
  881.      were first beginning to be understood it was found that you could get
  882.      1500::1460 by asking for 1501::1460 (!) and for a while setting 1501
  883.      was the best available advice. This still works, but the advice above
  884.      is simpler to understand and apply.
  885.  
  886.      Remember that all of the numbers given above (except for 1501::1460)
  887.      correctly use the relationship "n"::"n-40". The values explicitly
  888.      EXCLUDE the PPP header byte and various other red tape associated with
  889.      using PPP, which can be ignored when determining the numbers in this
  890.      section.
  891.  
  892.      As it happens, there is a bug in the PPP code of KA9Q (reported, but
  893.      not yet corrected). This means that negotiating a link value which is
  894.      smaller than the link value at the Demon end will fail, and you will
  895.      get to the HELLO prompt but no further. Negotiating to higher values
  896.      does not seem to suffer from this problem ... except for the problem
  897.      of negotiating up to 1500 discussed above.
  898.  
  899.      The simplest way of avoiding any problems is to always set the mru=
  900.      value on the login line to the same as the value you want KA9Q to
  901.      negotiate. Thus if you wanted to use, say, a small mss value like 266
  902.      then you must set the ppp negotiation to 306 (ie 266+40) and you
  903.      should set the login line sent by the dialler to be "PPP,mru=306".
  904.  
  905. Even more advice:
  906.      If you regularly use telnet at the same time as an NNTP news transfer
  907.      (or FTP file transfers) then consider a smaller MSS.
  908.  
  909. How:
  910.      As explained above, set the tcp mss command to "n" and the attach and
  911.      two ppp setup commands to n+40. You must also set the dialler login
  912.      line to specify mru= the n+40 value.
  913.  
  914. Why:
  915.      When you are using the telnet protocol you are sending very small
  916.      packets (with just a character or two in each). In the absence of
  917.      fancy priority queuing these packets must wait their turn behind the
  918.      big 1500 byte packets. Since 1500 bytes of FTP will take about a
  919.      second to come over the link you can see that this can make telnet
  920.      response rather jerky. Smaller packets mean that the telnet
  921.      information can flow more smoothly. This is in fact much the same
  922.      scenario as the speeding up of remote PoP logins discussed above.
  923.  
  924.      There is obviously some overhead in using smaller packets. However
  925.      because the headers are compressed so much, it is not very high. Van
  926.      Jacobson's RFC on compression recommends choosing 240 at 9600 bps. At
  927.      this size, you can send 1460 bytes in just over 6 packets. Thus the
  928.      extra overhead is about 25 bytes per 1500. ie even with quite small
  929.      packets the "cost" is only about 1.6%.
  930.  
  931.      Note that if you are *only* doing telnet then the only packets for
  932.      transfer will be telnet packets and so you will see no difference in
  933.      response no matter what transfer sizes you use. See also section 15
  934.      for other reasons for slow telnet response.
  935.  
  936. 12.  NNTP request queues
  937. ===  ===================
  938.  
  939.      Some of the throughput problems with Usenet news are caused by delays
  940.      at the Demon NNTP server. It is possible to improve the flow by an
  941.      "nntp batch on 12" command in autoexec.net. This issues requests for
  942.      articles 12 ahead so that the overworked news machine is able to start
  943.      on fetching further articles whilst KA9Q is still receiving a previous
  944.      one. You can change this setting from the DIS front end program [D A
  945.      f6].
  946.  
  947.      [The value 12 is chosen random(ish)ly. It has been suggested that even
  948.      with higher values the flow is still more "jerky" than might be
  949.      desirable.]
  950.  
  951. 13.  HISTORY
  952. ===  =======
  953.  
  954. Advice:
  955.      If you are getting slow transfer times then slim down your HISTORY
  956.      file (by hand or by expiring some news).
  957.  
  958.      Slow transfers are a problem that comes suddenly upon people after
  959.      days or weeks of acceptable performance. It only affects NEWS; email
  960.      and FTP will still work at full speed.
  961.  
  962. How:
  963.      Besides discarding or archiving old news the EXPIRE program will also
  964.      trim your HISTORY file (kept in _\spool\news) according to the
  965.      criteria set in EXPIRE.DAT (same place).
  966.  
  967.      The relevant command is: [tail] 1000
  968.  
  969.      where 1000 is the number of news article identifiers to be retained in
  970.      the HISTORY file. A sensible value is just over one day's worth of
  971.      articles, but anything under 2000 is likely to be OK.
  972.  
  973. Note:
  974.      If you run expire directly (as in "expire 10") then it will not use
  975.      EXPIRE.DAT and it will not reduce the size of your HISTORY file. You
  976.      will need to take other steps to do this.
  977.  
  978. Why:
  979.      The purpose of the HISTORY file is to record article identifiers which
  980.      have already been downloaded to your system, so that even if you are
  981.      offered them again you will not refetch them, but will instead see
  982.      them reported as duplicates. KA9Q keeps this list of identifiers in
  983.      memory if possible, but failing that it has to read the list off disk
  984.      in order to check. It is these disk transfers which ruin the
  985.      performance.
  986.  
  987.      You can of course use different values than 1000 for tail, indeed some
  988.      people use 0, and can thus avoid using expire but just delete the
  989.      HISTORY file altogether. If you use 0 then any duplicate news will be
  990.      downloaded, but the SNews unbatch program will still discard the
  991.      duplicates using the HISTORY.SNW file (whose contents are controlled
  992.      by the [life] parameter).
  993.  
  994.      It is usual to be offered a few duplicates at the start of each NNTP
  995.      session (because of the way the "last fetched news" time is handled).
  996.      Therefore, if you use [tail] 0 you must be prepared to waste time
  997.      downloading a few articles which will be discarded by unbatch. A
  998.      higher setting is therefore to be recommended.
  999.  
  1000. Note:
  1001.      Some people have managed to damage their EXPIRE.DAT so that the [tail]
  1002.      command is missing altogether. Of course, running expire in this state
  1003.      will not reduce the size of the HISTORY file.
  1004.  
  1005. 14.  PPP versus SLIP
  1006. ===  ===============
  1007.  
  1008. Advice:
  1009.      Use PPP.
  1010.  
  1011. How:
  1012.      Send "PPP" to the protocol prompt. This is the default set into the
  1013.      DIS front end program. (Better, usually is "PPP,mru=1500" or whatever
  1014.      size you require; see section 11 above.)
  1015.  
  1016. Discussion:
  1017.      Demon recommend using PPP for connections with KA9Q, and the latest
  1018.      versions will have had SLIP removed. There are better diagnostic tools
  1019.      at the Demon end for PPP problems, and this doubtless contributes to
  1020.      their preference for it. However, Windows applications working through
  1021.      Winsock usually seem to use SLIP instead. Sometimes people ask why...
  1022.  
  1023.      SLIP is a fairly simple scheme for sending TCP/IP packets down a
  1024.      serial wire. The code is trivial (assuming you are happy about
  1025.      interrupts and serial chips and such). Compressing SLIP headers
  1026.      (RFC1144) is not entirely trivial, but is not a vast amount of code
  1027.      and improves telnet responsiveness especially (and reduces link
  1028.      traffic generally). Some example code is in the RFC so it is pretty
  1029.      easy to add to an existing program. This means that people can easily
  1030.      support SLIP - so they do. Some people use the name CSLIP for SLIP-
  1031.      plus-header-compression. This document does not bother to distinguish,
  1032.      because there are very few implementations of SLIP which are not CSLIP
  1033.      as well.
  1034.  
  1035.      PPP is a rather fancier animal altogether. It will handle multiple
  1036.      protocols down the same wire (which is not very relevant in this
  1037.      context). It can also deal with links which use software flow control
  1038.      or which cannot transmit some characters (which is also not very
  1039.      relevant). With suitable compression negotiated you get much the same
  1040.      overhead per packet as with SLIP (it rather depends quite what you
  1041.      send!). Since it is a bigger (and newer (the latest RFC came out just
  1042.      before Xmas)) protocol there are rather fewer implementations around,
  1043.      however KA9Q does have PPP built in.
  1044.  
  1045.      Winsock protocol stacks often use packet drivers for their network
  1046.      connections. The Crynwr set of freely available packet drivers does
  1047.      not at present contain a PPP driver. There are in fact very few PPP
  1048.      packet drivers around (which you don't have to pay for) and their
  1049.      reputation for using 8250s (as opposed to 16550As) is not very good.
  1050.      The Trumpet shareware Winsock stack can either use a packet driver or
  1051.      its own internal SLIP. The very latest beta versions of the Trumpet
  1052.      stack now support PPP and some people have used this successfully (and
  1053.      others have not). All of this means that at present most Winsock users
  1054.      are connecting with SLIP.
  1055.  
  1056.      The received wisdom is that PPP is a teeny bit faster in practice than
  1057.      SLIP, but only by a little bit. Since they both tend to add the same
  1058.      protocol overheads of single bytes each end of a packet, and can both
  1059.      use header compression the transfer rates will depend upon horrible
  1060.      practical issues of error recovery which will depend on the sort of
  1061.      corruption you get on your link; whether your error correcting modem
  1062.      actually does correct your errors; and how many data octets [ that's
  1063.      bytes :-) ] need escaping.
  1064.  
  1065.      This similarity in performance means that other issues elsewhere in
  1066.      the software can easily swamp the differences between competent
  1067.      implementations of either protocol. So the bottom line is that you
  1068.      should use PPP when you can, and SLIP if you can't, and it doesn't
  1069.      make a lot of difference either way.
  1070.  
  1071. 15.  Telnet speed
  1072. ===  ============
  1073.  
  1074.      Telnet responsiveness was discussed above in the section on IP
  1075.      fragmentation. However, you should also be aware that you can get very
  1076.      "soggy" links when the remote end is echoing what you type.
  1077.  
  1078.      The reason is simply that the other machine is a long way away. It's
  1079.      typically 300ms to Finchley, 800ms to the US and 1.6 seconds or more
  1080.      to Europe (because European traffic crosses the Atlantic twice for
  1081.      reasons more to do with politics than technical issues). You can't
  1082.      change these routes - you're stuck with them - and so echoes from the
  1083.      remote machine can take a long time. Also, when dealing with European
  1084.      machines, you will find that the infrastructure is slower and many
  1085.      more machines are connected by fairly slow and congested links.
  1086.  
  1087.      You can use "ping" to find out how far away the remote machine is. Try
  1088.      "ping xx.xx.xx" when you've gone "telnet xx.xx.xx" to see how far away
  1089.      the machine is. If you're interested in the path taken there then try
  1090.      "hop check xx.xx.xx" and you'll see the little tour of the Eastern US
  1091.      states that most traffic takes.
  1092.  
  1093.      When using "ping" you must remember that the packets it is sending are
  1094.      queued for transmission in the normal way. Thus if you "ping" during
  1095.      news transfer you will get higher values than otherwise. Since this is
  1096.      pretty much what happens to telnet traffic, this may contribute to the
  1097.      information you need to tune your packet sizes.
  1098.  
  1099. 16.  Other improvements
  1100. ===  ==================
  1101.  
  1102.      Whilst receiving news and email the incoming data must eventually be
  1103.      written to disk. The usual suggestions for increasing disk performance
  1104.      apply : defragment the drive, set BUFFERS= to a sensible value, use
  1105.      SMARTDRV, use a RAMDISK etc. All of these are Good Things provided, as
  1106.      discussed extensively above, you check that they don't introduce
  1107.      hardware overruns.
  1108.  
  1109.      Several people with more than one drive have reported improvements
  1110.      from ensuring that the incoming _\spool\articles\BATCH.TXT file is
  1111.      placed on the faster drive.
  1112.  
  1113.      Finally, it has been suggested that provided your modem has software
  1114.      flow control disabled (ie you can send _Q and _S (XON, XOFF) as data)
  1115.      then there is little point in having the ppp protocol escape these
  1116.      values. This change would make a marginal difference to ZIP transfer
  1117.      speeds, but none at all to news and other text transfers. Has anyone
  1118.      tried this ?
  1119.  
  1120. 17.  OS/2
  1121. ==   ====
  1122.  
  1123.      All multi-tasking operating systems use some of the available machine
  1124.      performance to do their magic, so if you are short of machine power
  1125.      then OS/2 (or indeed NT or plain Windows) will use machine cycles
  1126.      which would otherwise be used to execute KA9Q.
  1127.  
  1128.      However, most modern machines are fast enough that you are in practice
  1129.      unaffected by the overhead, and you are actually limited by the serial
  1130.      link speed. On such a machine (like a 25 MHz 486) you will see no
  1131.      difference between, for example, KA9Q for OS/2, KA9Q in an OS/2 DOS
  1132.      box or KA9Q running under real DOS. On a more modest PC (like a 20MHz
  1133.      386SX) you will find that using OS/2 will slow down News collection
  1134.      considerably (1400 cps rather than 2700, say), but that FTP speeds
  1135.      will be almost unaffected.
  1136.  
  1137.      You have the option of running two different flavours of KA9Q under
  1138.      OS/2:
  1139.  
  1140.           *    DOS KA9Q v2.16 in an OS/2 DOS session earlier versions do
  1141.                not have important buffering fixes.
  1142.  
  1143.           *    OS/2 KA9Q v2.17 (OS/2 version 2.40) running as a PM
  1144.                application and including Archie and Gopher clients.
  1145.  
  1146.      again, avoid earlier versions because OS/2 version 2.40 fixed a long-
  1147.      time bug that caused lockups. The latest version is on ftp.demon.co.uk
  1148.      in /pub/os2/netos2.
  1149.      This version is exempt from advice in earlier versions of this
  1150.      document to specially boost the process priorities.
  1151.  
  1152.      You should install Ray Gwinn's shareware SIO/VSIO serial port drivers
  1153.      to get a virtual buffered serial port with a 4096 character buffer.
  1154.      These drivers provide most benefit to DOS comms applications running
  1155.      under OS/2. Find these on ftp.demon.co.uk in /pub/os2/netos2 as the
  1156.      file sioXXXX.zip, where XXXX is the version number. Don't forget to
  1157.      register them.
  1158.  
  1159.      A 16550A is strongly recommended for use with OS/2, although the
  1160.      SIO/VSIO drivers can provide near 16550 performance on machines with
  1161.      unbuffered UARTs.
  1162.  
  1163.      To set the "performance baseline" for your machine you could try
  1164.      booting "real DOS" and running DOS KA9Q v2.16. (This will only be
  1165.      possible if you have dual boot or boot manager installed and KA9Q is
  1166.      running from a FAT partition.) You can use this performance level to
  1167.      assess how well your OS/2 setup is doing.
  1168.  
  1169.      Note that the OS/2 and DOS versions of KA9Q will happily share the
  1170.      same configuration files, so swapping around to experiment is
  1171.      relatively easy.
  1172.  
  1173. 18.  The Authors
  1174. ===  ===========
  1175.  
  1176. This FAQ is maintained by Richard Palmer (Tuning@blackbrd.demon.co.uk It is
  1177. based on the Tuning FAQ by Richard Clayton and Phineas R John. Many of the
  1178. ideas and advice that have been culled from the demon.ip.support.*
  1179. newsgroups. I hope that the original authors will be pleased to see their
  1180. ideas here, even if their names are absent.
  1181.  
  1182.  
  1183. 19.  Disclaimer
  1184. ===  ==========
  1185.  
  1186. Although whilst writing this document I have tried to be accurate, and to
  1187. give good advice, I have not spent the time or effort on it that would be
  1188. necessary for it to be in any sense authoritative. In particular the
  1189. efforts I have made fall short of the sort of standard which would be
  1190. expected from us in our professional capacities. You follow any advice
  1191. within this document entirely at your own risk. Take a note of settings
  1192. before you change them, and always take a back up copy of data which is of
  1193. value to you.
  1194.  
  1195. Naturally I would be pleased to receive email with corrections and
  1196. suggestions for improvements and alterations. Please write to:
  1197.  
  1198.      Tuning@blackbrd.demon.co.uk
  1199.  
  1200.  
  1201. ---------------------------------------------------------------------------
  1202. Copyright 1995 Richard J Palmer (Tuning@blackbrd.demon.co.uk)
  1203. Original FAQ Copyright Richard Clayton & Phineas R John.
  1204.  
  1205. This file may be freely distributed provided that it remains unedited from
  1206. its current form. The latest version is posted regularly to the newsgroup
  1207. demon.ip.support.pc. It is available by FTP from ftp.demon.co.uk as
  1208. pub/doc/ka9q/Tuning.faq or can be obtained upon email request to
  1209. Tuning@blackbrd.demon.co.uk
  1210.  
  1211. end of TUNING.FAQ Issue 29                             10th July 1995
  1212.  
  1213. ---------------------------------------------------------------------------
  1214.  
  1215.  
  1216.